import request from '@/utils/request'

// 获取评论列表
export function listComments(query) {
  return request({
    url: '/comment/list',
    method: 'get',
    params: query
  })
}

// 获取评论详情
export function getComment(commentId) {
  return request({
    url: '/comment/list',
    method: 'get',
    params: { orderId: commentId }
  })
}

// 删除评论
export function deleteComment(commentId) {
  return request({
    url: '/comment/delete',
    method: 'delete',
    params: { commentId }
  })
}

// 提交评论
export function submitComment(data) {
  return request({
    url: '/comment/submit',
    method: 'post',
    data: data
  })
}

// 回复评论
export function replyComment(data) {
  return request({
    url: '/comment/reply',
    method: 'post',
    data: data
  })
}

// 获取评论统计数据
export function getCommentStats() {
  return request({
    url: '/comment/stats',
    method: 'get'
  })
} 